package com.qf.dao;

import com.qf.entity.Relation;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;


/**
 * @description: cool新闻
 * @author: No1
 * @create: 2020-11-30 11:33:07
 */
public interface RelationDao {
    /*新增*/
    @Insert("insert into t_relation (id,uid1,uid2,relation) values(#{id},#{uid1},#{uid2},#{relation})")
    int insert(Relation relation);

    /*删除*/
    @Delete("delete from t_relation where id=#{id}")
    int deleteById(int id);
    /*查询全部*/
    @Select("select * from t_relation")
    List<Relation> all();
}